﻿<UserControl x:Class="Schedulr.Plugins.RunRenderingProgram.RunRenderingProgramPluginSettingsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="Program" Margin="0,0,5,0" VerticalAlignment="Center" />
        <Grid Grid.Row="0" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" Text="{Binding Path=FileName}" />
            <Button Grid.Column="1"  Content="..." x:Name="browseFileNameButton" Click="browseFileNameButton_Click" Margin="5,0,0,0" Style="{DynamicResource MediumButton}" />
        </Grid>

        <Label Grid.Row="1" Grid.Column="0" Content="Working folder" Margin="0,5,5,0" VerticalAlignment="Center" />
        <Grid Grid.Row="1" Grid.Column="1" Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" Text="{Binding Path=WorkingDirectory}" />
            <Button Grid.Column="1"  Content="..." x:Name="browseWorkingDirectoryButton" Click="browseWorkingDirectoryButton_Click" Margin="5,0,0,0" Style="{DynamicResource MediumButton}" />
        </Grid>

        <Label Grid.Row="2" Grid.Column="0" Content="Arguments" Margin="0,5,5,0" VerticalAlignment="Center" />
        <Grid Grid.Row="2" Grid.Column="1" Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Row="0" Grid.Column="0" Text="{Binding Path=Arguments}" />
            <Button Grid.Row="0" Grid.Column="1"  Content="..." x:Name="editArgumentsTemplateButton" Click="editArgumentsTemplateButton_Click" Margin="5,0,0,0" Style="{DynamicResource MediumButton}" />
        </Grid>

        <TextBlock Grid.Row="3" Grid.Column="1" Margin="0,5,0,0" Foreground="{DynamicResource UserMessageFontBrush}" x:Name="argumentsInfoTextBlock" TextWrapping="Wrap" />

        <Label Grid.Row="4" Grid.Column="0" Content="Run on" Margin="0,5,5,0" VerticalAlignment="Center" />
        <WrapPanel Grid.Row="4" Grid.Column="1" Margin="0,5,0,0">
            <CheckBox IsChecked="{Binding Path=RunOnPictures}"><Label Content="Pictures" /></CheckBox>
            <CheckBox IsChecked="{Binding Path=RunOnVideos}" Margin="5,0,0,0"><Label Content="Videos" /></CheckBox>
        </WrapPanel>

        <Label Grid.Row="5" Grid.Column="0" Content="File extensions" Margin="0,5,5,0" VerticalAlignment="Center" />
        <StackPanel Grid.Row="5" Grid.Column="1" Margin="0,5,0,0" Orientation="Horizontal">
            <TextBox Text="{Binding Path=InputFileExtension}" MinWidth="40" Margin="0,0,5,0" />
            <Label Content="for the temporary input file" VerticalAlignment="Center" />
        </StackPanel>

        <StackPanel Grid.Row="6" Grid.Column="1" Margin="0,5,0,0" Orientation="Horizontal">
            <TextBox Text="{Binding Path=OutputFileExtension}" MinWidth="40" Margin="0,0,5,0" />
            <Label Content="for the temporary output file" VerticalAlignment="Center" />
        </StackPanel>

        <TextBlock Grid.Row="7" Grid.Column="1" Margin="0,5,0,0" Foreground="{DynamicResource UserMessageFontBrush}" TextWrapping="Wrap" Text="If the program you are using depends on certain file extensions, you can configure these here (if not, you can leave them empty to use the original file extension)." />
    </Grid>
</UserControl>